package com.wx.feign.order.controller;

import com.wx.commons.result.R;
import com.wx.feign.order.clients.PaymentClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author: 王霄
 * @date: 2021/12/24 21:42
 */
@RestController
@RequestMapping("/order2")
public class OrderController {

    @Resource
    private PaymentClient paymentClient;

    @GetMapping("/queryById/{id}")
    public R<?> queryById(@PathVariable("id") Long id) {
        return paymentClient.queryById(id);
    }

    @GetMapping("/queryByIdTimeout/{id}")
    public R<?> queryByIdTimeout(@PathVariable("id") Long id) {
        return paymentClient.queryByIdTimeout(id);
    }
}
